//app.js
const http = require('./utils/http.js');
App({
  onLaunch: function() {
    // 进入系统直接登录一次 获取session

    http.request('/wechatshop/login/').then(data => {
      wx.setStorageSync(
        'session_id',
        data.session_id,
      )
    })

    // while (!wx.getStorageSync('session_id')); //等待验证通过

    http.getCartCount();
    
  },
  globalData: {
    userInfo: null,
    cartCount:0 // 购物车的数量
  }
})